<?php
class router extends CI_Controller {
    public function __construct()
    {
        parent::__construct();
        $this->load->model('routermanager');
        $this->load->helper('url_helper');
    }
 
	public function saveMac()
    {
		parse_str($_SERVER['QUERY_STRING'], $_GET);
		$mac=$_REQUEST["mac"];
		$phone=$_REQUEST["phone"];
		$t=$_REQUEST["t"];
		$m=$_REQUEST["m"];
        $data=$this->routermanager->save_mac($mac,$phone,$t,$m);
		echo json_encode($data);
    }
}